package org.hnsd.train.pattern.strategy;

/**
 * @author youqd
 * @tag.date 2023-11-01 17:20
 **/
public class QueryContext {
    private IQueryStrategy queryStrategy;

    public QueryContext(IQueryStrategy queryStrategy) {
        this.queryStrategy = queryStrategy;
    }

    public Object list(Object query){
        return queryStrategy.list(query);
    }

    public static void main(String[] args) {
        new QueryContext(new DeptQuery()).list(null);
    }
}
